package com.goldsign.pay.provider.userbase.dao;

import com.goldsign.pay.provider.userbase.vo.CustomerInfoDO;
import com.goldsign.pay.provider.userbase.vo.LoginIdInfoDO;
import com.goldsign.pay.provider.userbase.vo.UserInfoDO;
import org.apache.ibatis.annotations.Mapper;


import java.sql.SQLException;

@Mapper
public interface UserServiceDao {

	/**
	 * 根据手机号码查询用户信息
	 * @param userNo
	 * @return
	 * @throws SQLException
	 */
	UserInfoDO getUserInfoByMobNo(String userNo) throws SQLException;
	
	/**
	 * 根据邮箱查询用户信息
	 * @param email
	 * @return
	 * @throws SQLException
	 */
	UserInfoDO getUserInfoByEmail(String email) throws SQLException;
	
	/**
	 * 根据用户编号查询用户信息
	 * @param userNo
	 * @return
	 * @throws SQLException
	 */
	UserInfoDO getUserInfoByUserNo(String userNo) throws SQLException;
	
	/**
	 * 创建用户信息
	 * @param userInfo
	 * @return
	 * @throws SQLException
	 */
	int insertUserInfo(UserInfoDO userInfo) throws SQLException;
	
	/**
	 * 创建用户后，将登录id插入到登录id表
	 * @param loginIdInfoDO
	 * @return
	 * @throws SQLException
	 */
	int insertLoginIdInfo(LoginIdInfoDO loginIdInfoDO) throws SQLException;
	
	/**
	 * 获取客户信息
	 * @param customerNo
	 * @return
	 * @throws SQLException
	 */
	CustomerInfoDO getCustomerInfo(String customerNo) throws SQLException;
	
	/**
	 * 根据登陆id查询用户信息
	 * @param loginId
	 * @return
	 * @throws SQLException
	 */
	UserInfoDO getUserInfoByLoginId(String loginId) throws SQLException;
}
